package com.zhanghe.study.design_pattern.composite_pattern;

/**
 * 组合模式
 * @author zh
 * @date 2022/10/15 18:23
 */
public class Main {
    public static void main(String[] args) {
        Leaf leaf = new Leaf("kuku");
        Leaf leaf2 = new Leaf("qiqi");

        Composite composite = new Composite();
        composite.addChild(leaf);
        composite.addChild(leaf2);

        composite.doSomething();
    }
}
